<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<%
		String path = request.getContextPath();
		String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	%>
		<link href="<%=basePath %>resource/uilib/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
    <script src="<%=basePath %>resource/jquery/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="<%=basePath %>resource/uilib/js/ligerui.min.js" type="text/javascript"></script>   
    <link href="<%=basePath %>resource/css/common.css" rel="stylesheet" type="text/css" />  
    <script src="<%=basePath %>resource/js/common.js" type="text/javascript"></script>   
    <script src="<%=basePath %>resource/js/LG.js" type="text/javascript"></script>
    <script src="<%=basePath %>resource/js/ligerui.expand.js" type="text/javascript"></script> 
    <script src="<%=basePath %>resource/json2.js" type="text/javascript"></script> 
    <script src="<%=basePath %>resource/jquery-validation/jquery.validate.min.js" type="text/javascript"></script>
	<script src="<%=basePath %>resource/jquery-validation/jquery.metadata.js" type="text/javascript"></script>
	<script src="<%=basePath %>resource/jquery-validation/messages_cn.js" type="text/javascript"></script>
	<script src="<%=basePath %>resource/js/validator.js" type="text/javascript"></script>
	<script src="<%=basePath %>resource/js/ajaxfileupload.js" type="text/javascript"></script>
	<script src="<%=basePath %>resource/uilib/js/plugins/ligerComboBox.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basepath = '<%=basePath %>';
		
	</script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>教职工信息管理</title>
<script type="text/javascript" src="<%=basePath %>/pages/test.js"></script>

</head>
<body style="padding: 4px; overflow: hidden;">
	
	<div id="tabcontainer" style="  margin:3px;">
     <div title="基本信息">
        <form id="mainform" method="post"></form> 
     </div>
     <form id="mainform">
	     <input type="checkbox" name="aa" value="1"> aa1
	     <input type="checkbox" name="aa" value="2"> aa2
     </form>
   </div>
   <script type="text/javascript">
   
  
   var mainform = $("#mainform");
   var ele = $("[name='aa']",mainform);
   
  // alert(JSON2.stringify(ele));
   alert(ele.length);
   //针对复选框和单选框 处理
   if (ele.is(":checkbox,:radio"))
   {
	   alert(true);
       ele[0].checked = '2' ? true : false;
   }else{
	   alert(false);
   }
   
   </script>
</body>
</html>